<template>
    <div style="background-color: red;display: flex;justify-content: center;">
        <ul>
            <li v-for="item in nav" :key="item">{{ item }}</li>
        </ul>
    </div>
</template>

<script>
    export default {
        data() {
            return {
                nav: ['京东','淘宝','天猫','拼多多']
            }
        },
    }
</script>

<style lang="scss" scoped>
 ul{
    display: flex;
    list-style: none;
    li{
        padding: 10px 20px;
    }
 }
</style>